package com.xlj.mallx.controller;

import com.xlj.mallx.model.pojo.User;
import com.xlj.mallx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 16436
 * @version 1.0
 * @date 2021/5/2 13:32
 */
@Controller
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/test",method = RequestMethod.GET)
    @ResponseBody
    public User personPage() {
        User user = userService.getUser();
        return user;
    }
}
